home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / 8bit / cislib_b / time.doc < prev    next >
Text File  |  1995-04-22  |  2KB  |  66 lines

  1.  
  2.                                       TIME 
  3.  
  4.  
  5.    TIME is a BASIC subroutine to get the current real-time clock value in 
  6. "jiffies" (1/60 second). 
  7.  
  8.    IMPORTANT NOTES 
  9.  
  10.    1.  TIME is fully self-relocatable, so it may be moved anywhere in memory. 
  11.    2.  The Atari real-time clock counts from zero as of the last boot (or the 
  12. last time that the real-time clock was zeroed). 
  13.    3.  The jiffies are returned as an 8-byte ATASCII number in a string. [The 
  14. string should normally be set to 8-byte length before use, like 
  15. 'JIFFIE$(8)="X"'. After calling TIME, the string is normally converted to a 
  16. number like "JIFFY=VAL(JIFFIE$)".] 
  17.  
  18.    CALLING 
  19.  
  20. RETURNCODE=USR(TIME, SADR) 
  21.  
  22.    TIME:  The address of the TIME subroutine [usually ADR(TIMESTRING$)]. 
  23.    SADR:  Address of the string to receive the ATASCII value of the jiffies 
  24. [usually ADR(DATASTRING$)]. The string must be at least 8 bytes long. 
  25.  
  26.    DEMONSTRATION 
  27.  
  28.    TIME.BIN is a simple tokenized BASIC (binary) program which will demonstrate 
  29. the TIME subroutine. It computes the time between each pressing of the RETURN 
  30. key (and shows a way to compute normal clock time). 
  31.  
  32.    USE 
  33.  
  34.    To use the subroutine, just transfer the statements 900-904 to your own 
  35. program (you could do a LIST "D:TEMP",900,904 from the demo followed by an ENTER 
  36. "D:TEMP" into your own program); of course, you can renumber the statements as 
  37. necessary. Remember to call the subroutine once at the beginning of your program 
  38. to set it up. 
  39.  
  40.    -John Navas [72645,1070] 
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.